import { request } from './request'
export function getDetail(iid) {
  return request({
    url: '/detail',
    params: {
      iid
    }
  })
}

export class Goods {
  constructor(itemInfo, columns, service, shopInfo, itemParams, detailInfo, rate) {
    this.desc = itemInfo.desc
    this.price = itemInfo.price
    this.newprice=itemInfo.newprice
    this.oldPrice = itemInfo.oldPrice
    this.discount = itemInfo.discountDesc
    this.title = itemInfo.title
    this.columns = columns
    this.service = service
    this.shopInfo = shopInfo
    this.itemParams = itemParams
    this.detailInfo = detailInfo
    this.rate = rate
  }
}

export function getRecommend(){
  return request({
    url:'/recommend'
  })
}